from scrapy import cmdline
cmdline.execute('scrapy crawl spider -o python.json -s FEED_EXPORT_ENCODING=UTF-8'.split())